﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lambda
{
    public static class Booleans
    {
        public static Func<dynamic, Func<dynamic, dynamic>> F = new Func<dynamic, Func<dynamic, dynamic>>(a => b => b);
        public static Func<dynamic, Func<dynamic, dynamic>> T = new Func<dynamic, Func<dynamic, dynamic>>(a => b => a);

        public static Func<dynamic, Func<dynamic, dynamic>> and = new Func<dynamic, Func<dynamic, dynamic>>(m => n => m(n)(m));
        public static Func<dynamic, Func<dynamic, dynamic>> or = new Func<dynamic, Func<dynamic, dynamic>>(m => n => m(m)(n));
        public static Func<dynamic, Func<dynamic, Func<dynamic, Func<dynamic, dynamic>>>> xor =
            new Func<dynamic, Func<dynamic, Func<dynamic, Func<dynamic, dynamic>>>>(m => n => a => b => m(n(b)(a))(n(a)(b)));
    }
}
